package InheritanceDemo;

public class Person {
    private String id;
    private String name;
    private String gender;

    public Person(String id, String name) {
        this.id = id;
        this.name = name;
    }

    public String getId() {
        return id;
    }

    public void setId(String id) {
        this.id = id;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public void showBasicInfo() {
        System.out.println("编号: " + id + ",姓名： " + name + ",性别： " + gender);
    }

    public void showInfo() {
        System.out.println("人员信息: " + id + "," + name);
    }

    protected String address;

    public Person() {
        System.out.println("执行person的无参构造");

    }

    public void work() {
        System.out.println("在学校工作");
    }

    public Person(String id, String name, String gender) {
        this.id = id;
        this.name = name;
        this.gender = gender;
    }


}
